//////////////////////////////////////////////////////////////////
//
// Convoys.cs
//
// Copyright (c) 2012 Dan Pike. All rights reserved
//
// Refer to license.txt for any license restrictions.
// 
using Logger4Net;
using System.Configuration;

namespace Entities.Archive
{
   [ConfigurationCollection(typeof(Convoys), AddItemName = "convoy", CollectionType = ConfigurationElementCollectionType.BasicMap)]
   public class Convoys : Utilities.ArchiveCollection<Convoy>
   {
      //////////////////////////////////////////////////////////////////////////
      //
      public Convoys()
      {
      }

      //////////////////////////////////////////////////////////////////////////
      //
      protected override ConfigurationElement create(string key)
      {
         Convoy element = new Convoy();
         element.name = key;
         return element;
      }

      protected override object GetElementKey(ConfigurationElement element)
      {
         return (element as Convoy).name;
      }

      //////////////////////////////////////////////////////////////////////////
      //
      protected override string ElementName
      {
         get { return "convoy"; }
      }
   }
}
